OTNextOption
Locates the nextTOption
structure in a buffer.C INTERFACE
OSErr OTNextOption (UInt8* buffer, UInt32 buflen, TOption** prevOptPtr;C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
buffer
- A pointer to the buffer containing the option to be found.
buflen
- A long specifying the size of the buffer containing the option to be found.
prevOptPtr
- A pointer to a pointer to the first or current
TOption
structure. The first time you call the function, set this parameter to the beginning address of the buffer containing the options to be found. On return, this parameter references the beginning address of the next optionDESCRIPTION
TheOTNextOption
function allows you to parse through a buffer containingTOption
structures describing an endpoint's option values. Within the buffer,TOption
structures are aligned to long-word boundaries. This function takes into account this padding when it calculates the beginning address of the nextTOption
structure and it returns that address in theprevOptPtr
parameter.The first time you call the option, set the
prevOptPtr
parameter to the beginning address of the buffer. When the function returns, theprevOptPtr
parameter points to the next (second) option in the buffer. You can continue this process, specifying the value returned for theprevOptPtr
parameter by the previous invocation of the function, each time you call the function to obtain the beginning address of each option in the buffer.SEE ALSO
To find a particular option in a buffer, use theOTFindOption
function (page 5-43).